﻿<%@ Page %>
<html>
<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"/>
<title>视图属性</title>
<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/dialogs.css">

<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">

<script language="javascript" src="/_common/scripts/global.js"></script>
<script language="JavaScript" src="/_controls/util/util.js"></script>

<script language="javascript">

	function window.onload()
	{
		var o = window.dialogArguments;
		viewName.value = decodeXml(o[0]);
		viewDesc.value = decodeXml(o[1]);
		viewType.setValue(o[3]);
		if(o[4] > 0) viewType.disable();

		// Check if this should be Non-Customizable
		// 检查这个视图是否为不可定制的
		if (o[2] == "0")
		{
			btnDialogOk.disabled = viewName.readOnly = viewDesc.readOnly = true;
			viewType.disable();
			viewName.blur();
		}
	}

	function Ok()
	{
		if (viewName.value == "")
		{ 
			alert( "请输入视图名字" );
		}
		else
		{
			window.returnValue = new Array(viewName.value, viewDesc.value, viewType.returnValue);
			window.close();
		}
	}

	function updateUI()
	{
		btnDialogOk.disabled = (viewName.value == "" || viewName.readOnly);
	}
	
</script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="8" width="100%" height="100%">
	<tr>
		<td class="header">
			<!--div class="header">Provide Information for This View</div-->
			<!--div class="headerdesc">Provide a name and description for this view. The name will be visible to users in the View drop-down list.</div-->
			<div class="header">视图信息</div>
			<div class="headerdesc">为这个视图设置名称、描述和类型。普通视图名称将在视图下拉列表中对用户可见。</div>
		</td>
	</tr>
	<tr>
		<td class="main">

			<table cellpadding="0" cellspacing="5" width="100%" height="100%">
			<col width="70"></col>
				<tr style="height:25px">
					<td class="req">视图名称</td>
					<td><input id="viewName" type="text" class="txt" name="viewName" onblur="value = Trim(value);" maxlength="100" onkeyup="updateUI();"></td></tr>
				<tr>
					<td valign="top">说明</td>
					<td valign="top"><textarea name="viewDesc" maxlength="200" style="height:85px;overflow-y:auto;" onkeyup="updateUI();"></textarea></td>
				</tr>						
				<tr>
					<td>视图类型</td>
					<td><span id="viewType" class="selectBox" value="0" onreturnvaluechange="updateUI();"><table cellspacing="0" cellpadding="2" style="display:none;"><tr><td val="0">普通视图</td></tr><tr><td val="2">关联视图</td></tr></table></span></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="buttons">
			<button id="btnDialogOk" onclick="Ok();" disabled>确定</button>
			&nbsp;
			<button onclick="window.close();">取消</button>
		</td>
	</tr>
</table>

</body>
</html>